<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="images/favicon.ico" />
<title>反馈与建议 - 未央店</title>
</head>

<body>
感谢您为我们提出宝贵的反馈与建议。<br />
您的每一个字我们都将倍加珍惜，认真思考。<br />
再次感谢！（本页可以关闭）<br /><br />
<a href="./index.php" target="_self">点击这里返回首页</a><br /><br />
<a href="./about.php" target="_self">点击这里返回"关于我们"</a>
</body>
</html>

<?php
require_once(dirname(__FILE__)."/../include/db_mysql.php");

//写反馈与建议日志
if( isset($_GET['feedbackCnt']) )  //说明有反馈内容文本
{   
	$text = stripslashes($_GET['feedbackCnt']);
	$ip = getenv("REMOTE_ADDR");

//	date_default_timezone_set('PRC');
//    $dt = date("Y-m-d   H:i:s");//当前时间
//	$cont = $dt."发生一次用户反馈\r\n".$text."\r\n##########################分隔条##################################\r\n\r\n";
//    error_log( $cont, 3, "./feedback.php.log");

    $sql = new SqlClass;
	//连接数据库
	$sql->connect();
	//执行sql语句
	$sql_command = "INSERT INTO  `sit`.`feedback` (
`id` ,
`ip` ,
`time` ,
`content` ,
`from`
)
VALUES (
NULL ,  '$ip', 
CURRENT_TIMESTAMP ,  '$text',  'fb_plugin'
);";
    
	$r = $sql->exec_sql( $sql_command );//保存执行sql的结果
	//关闭数据库
	$sql->close();

}

if( isset($_POST['contect_us']) )
{
	$text = stripslashes($_POST['contect_us']);
	$ip = getenv("REMOTE_ADDR");
	$phone = $_POST['phone'];
	$email = $_POST['email'];

    $sql = new SqlClass;
	//连接数据库
	$sql->connect();
	//执行sql语句
	$sql_command = "INSERT INTO  `sit`.`feedback` (
`id` ,
`ip` ,
`time` ,
`content` ,
`phone`,
`email`,
`from`
)
VALUES (
NULL ,  '$ip', 
CURRENT_TIMESTAMP ,  '$text', '$phone', '$email', 'contect_us'
);";
    
	$r = $sql->exec_sql( $sql_command );//保存执行sql的结果
	//关闭数据库
	$sql->close();
}

?>